home *** CD-ROM | disk | FTP | other *** search
/ Workplace Effectiveness: Critical Thinking Skills / Workplace Effectiveness: Critical Thinking Skills.iso / pc / Files / Rewind.dxr / 00031_Sound Handlers.ls < prev    next >
Encoding:
Text File  |  1998-09-14  |  1.2 KB  |  73 lines

  1. global currSndVolume
  2.  
  3. on keepLittleSounds
  4.   set vList to ["mouseDown.aif"]
  5.   repeat with vSound in vList
  6.     set the purgePriority of member vSound to 1
  7.   end repeat
  8. end
  9.  
  10. on HandlePuppetSound stringParam
  11.   stopSounds()
  12.   puppetSound(string(stringParam))
  13.   updateStage()
  14.   repeat while soundBusy(1)
  15.     if the mouseDown then
  16.       puppetSound(0)
  17.     end if
  18.     updateStage()
  19.   end repeat
  20.   stopSounds()
  21.   updateStage()
  22. end
  23.  
  24. on HandlePuppetSoundNS stringParam
  25.   stopSounds()
  26.   puppetSound(string(stringParam))
  27.   updateStage()
  28.   DelaySome(15)
  29.   repeat while soundBusy(1)
  30.     updateStage()
  31.   end repeat
  32.   stopSounds()
  33.   updateStage()
  34. end
  35.  
  36. on soundClicker playsound
  37.   global gClicked
  38.   if soundBusy(1) then
  39.     puppetSound(0)
  40.   else
  41.     puppetSound(playsound)
  42.     set gClicked to the clickOn
  43.   end if
  44.   if the clickOn <> gClicked then
  45.     puppetSound(playsound)
  46.     set gClicked to the clickOn
  47.   end if
  48. end
  49.  
  50. on stopSounds
  51.   sound stop 1
  52.   sound stop 2
  53.   puppetSound(0)
  54.   updateStage()
  55. end
  56.  
  57. on stopSound2
  58.   if soundBusy(2) then
  59.     sound stop 2
  60.   end if
  61. end
  62.  
  63. on setSound whatLevel
  64.   set the soundLevel to whatLevel
  65. end
  66.  
  67. on DelaySome howLong
  68.   startTimer()
  69.   repeat while the timer < howLong
  70.     nothing()
  71.   end repeat
  72. end
  73.